﻿<UserControl x:Class="ChumChase.FriendFeed.Views.FeedEntryTemplate"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:Converters="clr-namespace:ChumChase.FriendFeed.Converters">
    <UserControl.Resources>
        <Converters:NicknameToProfilePicUrlConverter x:Key="NicknameToProfilePicUrl" />
    </UserControl.Resources>
    <Border CornerRadius="4,4,4,4"
            BorderThickness="1,0.5,0.5,1"
            BorderBrush="#FF6C6C6C"
            Margin="0 2"
            Padding="4,4,4,4">
        <DockPanel>
            <Grid DockPanel.Dock="Left">
                <Image Width="50"
                       Height="50"
                       Source="{Binding Path=User, Converter={StaticResource NicknameToProfilePicUrl}}"
                       Margin="2,2,8,8" />
                <Image Width="16"
                       Height="16"
                       VerticalAlignment="Bottom"
                       Margin="2"
                       Source="{Binding Path=ServiceIcon}"
                       HorizontalAlignment="Right" />
            </Grid>

            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <TextBlock Text="{Binding Path=Title}"
                           TextWrapping="Wrap"
                           FontSize="16" />
                <TextBlock Grid.Row="1"
                           Text="{Binding Path=Service}" />
            </Grid>
        </DockPanel>
    </Border>
</UserControl>
